import java.util.Scanner;

public class demo3 {

    public static boolean isHappy(int n) {


        if(n<0){
            System.out.println("请输入正整数！");
            return false;
        }
        int arr[] =method(n);
        for (int i = 0; i < 10; i++) {
            System.out.println(arr[i]);
        }

        return true;
    }

    private static int i=0;

    private static int[] method(int num){
        int[] arr=new int[10];

        while (i<10){
            if(num<10){
                arr[i]=num;
                i++;
                break;
            }
            else{
                method(num/10);
                arr[i]=num%10;
                i++;
            }
        }
        return arr;
    }

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int a=scanner.nextInt();
        isHappy(a);
    }

}
